const { defineConfig } = require('@vue/cli-service')
const webpack = require('webpack')
const path = require('path');
module.exports = defineConfig({
  publicPath: "./",
  transpileDependencies: true,
  productionSourceMap: false,
  lintOnSave: false,
  configureWebpack: {
    plugins: [
      new webpack.ProvidePlugin({
        $: "jquery",
        jQuery: "jquery",
        "windows.jQuery": "jquery"
      })
    ],
    resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src')
      }
    }
  },
  devServer: {
    open: false,
    port: 8080,
    proxy: {
      '/api': {
        target: 'http://221.237.108.46',
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/api'
        }
      }
    }
  },
  css: {
    extract: false,
    loaderOptions: {
      sass: {
        additionalData: `@import "@/style/_variable.scss";`
      },
      less: {
        modifyVars: {
        },
        javascriptEnabled: true,
      }
    }
  }
})
